package com.example.demo.es;

import lombok.Data;

@Data
public class HotWord implements Comparable<HotWord>{
    private String value;

    private Long docCount;

    @Override
    public int compareTo(HotWord o) {
        if (docCount.longValue() > o.getDocCount().longValue()){
            return -1;
        }else if (docCount.longValue() < o.getDocCount().longValue()){
            return 1;
        }else {
            return 0;
        }

    }
}
